package com.czxy.service;

import com.czxy.dao.UserMapper;
import com.czxy.domain.User;
import com.czxy.utils.MyBatisUtils;

import java.util.List;

public class UserService {

    public List<User> findAll(){
        UserMapper mapper = MyBatisUtils.getMapper(UserMapper.class);
        List<User> list = mapper.findAll();
        MyBatisUtils.close();
        return list;
    }

    public User findUserAllInfoByUid(Integer uid){
        UserMapper mapper = MyBatisUtils.getMapper(UserMapper.class);
        User user = mapper.findUserAllInfoByUid(uid);
        MyBatisUtils.close();
        return user;
    }
}
